#ifndef __SPI_H__
#define __SPI_H__

#include "apt32f102b.h"

void spi_init(void);

void spi_deinit(void);

int spi_send_byte(const uint8_t byte);

int spi_send_bytes(uint8_t* data, uint8_t len);

int spi_recv_byte(uint8_t* byte);

int spi_recv_bytes(uint8_t* buffer, uint8_t len);

#endif
